import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    documentClientHeight: 0,
    sideNav: null,
    isDetail: false,
    isShow: true,
    addVisibel: false
  },
  mutations: {
    updateDocumentClientHeight (state, height) {
      state.documentClientHeight = height
    },
    sideNavFn (state, sideNav) {
      state.sideNav = sideNav
    },
    isDetailFn (state, isDetail) {
      state.isDetail = isDetail
    },
    isShowFn (state, isShow) {
      state.isShow = isShow
    },
    addVisibelFn (state, addVisibel) {
      state.addVisibel = addVisibel
    }
  }
})
